﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UtilsORM;
using UtilsORM.MySqlData;

namespace ServiceWeb.DBGateway
{
    public class DBIotDeviceVariableValueRlue
    {
        public DBIotDeviceVariableValueRlue()
        {

        }


        /// <summary>
        /// 获取变量可操作条件
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public List<iot_device_model_variable_value_rlue> getVariableValueRlueList(string type)
        {
            string sql = "select * from iot_device_model_variable_value_rlue where vr_type='" + type + "' ";
            return MySqlYihongIot.GetList<iot_device_model_variable_value_rlue>(sql);
        }

        /// <summary>
        /// 获取变量可操作条件
        /// </summary>
        /// <param name="type"></param>
        /// <returns></returns>
        public iot_device_model_variable_value_rlue getVariableValueRlue(string guid)
        {
            string sql = "select * from iot_device_model_variable_value_rlue where vr_guid='" + guid + "' ";
            return MySqlYihongIot.GetList<iot_device_model_variable_value_rlue>(sql).FirstOrDefault();
        }
    }
}
